Fix xtrace helper logic inversion and set -e abort risk in util-common.sh#4692
Closed
Copilot wants to merge 6 commits intoehvs/ARO-24815from
Closed
Fix xtrace helper logic inversion and set -e abort risk in util-common.sh#4692Copilot wants to merge 6 commits intoehvs/ARO-24815from
Copilot wants to merge 6 commits intoehvs/ARO-24815from
Conversation
To be extra safe and ensure no certificate details are logged via shell tracing.
Add shellcheck comments for warnings that can be safely ignored. Improve function readability by formatting them all in the same style.
Several warnings were unaddressed. Some of them were disabled as they can be safely ignored. Others were refactored as the warnings were legitimate.
|
Hi @copilot. Thanks for your PR. I'm waiting for a Azure member to verify that this patch is reasonable to test. If it is, they should reply with Regular contributors should join the org to skip this step. Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
467e224 to
865dc1d
Compare
|
Please rebase pull request. |
865dc1d to
3fd4684
Compare
- xtrace_set() was checking XTRACE_IS_SET == XTRACE_UNSET but should check XTRACE_IS_SET == XTRACE_SET to restore xtrace when it was on - Both xtrace_unset() and xtrace_set() used (( cond )) && cmd which returns non-zero when condition is false, potentially aborting scripts under set -e; changed to if-statements which always return 0 Co-authored-by: hlipsig <8000786+hlipsig@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] [ARO-24815] Prevent ACR refresh token exposure in audit logs
Fix xtrace helper logic inversion and set -e abort risk in util-common.sh
Mar 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two bugs in the xtrace save/restore helpers introduced in the ACR token protection work cause incorrect xtrace state and potential script abort under
errexit.Bugs fixed
Logic inversion in
xtrace_set(): was checkingXTRACE_IS_SET == XTRACE_UNSET— the opposite of the intended restore-if-was-on semantics. Result: xtrace was re-enabled when it was originally off, and not re-enabled when it was originally on.set -eabort risk:(( cond )) && cmdreturns non-zero when the condition is false. Since bootstrap scripts run witherrexit, calling either helper when the condition doesn't hold would terminate the script.Change
🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.